import os
from utils import ReadXml
from tqdm import tqdm

SrcDir = r"/media/fang/TOSHIBA EXT/Temp/Big_Merge1"
LabelName = ['15']
XmlFiles = []


for root, dirs, files in os.walk(SrcDir):
    for file in tqdm(files):
        if file[-1] == 'l':
            Locations = ReadXml(root + "/" + file)
            for Location in Locations:
                if Location[-1] in LabelName:
                    XmlFiles.append(file)
                    break
print("Find %d files" % len(XmlFiles))
print(XmlFiles)
